from selenium import webdriver
from selenium.webdriver.common.by import By
import time
# 创建浏览器驱动对象
driver = webdriver.Chrome()
# 加载web页面
driver.get("http://121.43.169.97:8848/pageA.html")
# 放大浏览器
driver.maximize_window()
# id选择器
driver.find_element(By.CSS_SELECTOR,"#userA").send_keys("admin")
# 属性选择器
driver.find_element(By.CSS_SELECTOR,"[name='passwordA']").send_keys("12300456")
# 类选择器
driver.find_element(By.CSS_SELECTOR,".telA").send_keys("13521345678")
# 多个class值，通过点号连接
driver.find_element(By.CSS_SELECTOR,".emailA.dzyxA").send_keys("123456@qq.com")
# 标签选择器
driver.find_element(By.CSS_SELECTOR,"button").click()

# 暂停3秒
time.sleep(3)
# 关闭驱动对象
driver.quit()